package com.chencs.biz.model.service;

import com.chencs.biz.model.mapper.ModelMapper;
import com.chencs.vo.biz.model.ModeBlockModel;
import com.chencs.vo.biz.model.ModeModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by fangzehua on 2017/7/8.
 */
@Service
@Transactional
public class ModelService {

    @Autowired
    private ModelMapper modelMapper;

    public List<ModeModel> getModelList(){

        return  modelMapper.getModelList();
    }

    public void insertModel(ModeModel modeModel){

        modelMapper.insertModel(modeModel);
    }

    public void updateModel(ModeModel modeModel){

        modelMapper.updateModel(modeModel);
    }

    public void  delModel(String id){

        modelMapper.delModel(id);
    }

    public ModeModel findModel(String id){

        return  modelMapper.findModel(id);
    }


    public void updateParameter(ModeBlockModel modeBlockModel){

         modelMapper.updateParameter(modeBlockModel);
    }


    public ModeBlockModel findModeBlockModelByMid(String mid){

        return  modelMapper.findModeBlockModelByMid(mid);
    }

    public void updateBlock(ModeBlockModel modeBlockModel){
        modelMapper.updateBlock(modeBlockModel);
    }

}

